{% include "head.html" %}
  <div id="stage" class="clearfix">
    <div class="content">  
    	<div id="addlog" class="post">
    		<span class="absolute box_2_t_l"></span> <span class="absolute box_2_t_r"></span> <span class="absolute box_2_b_l"></span> <span class="absolute box_2_b_r"></span>
        <h2>Add development log</h2>
        <form id="addlog" action="/admin/addlog" method="post">       	
        	<label for="content">content:</label> <br />
        	<textarea name="content" id="content" cols="100" rows="6" ></textarea><br />
        	
        	<input type="submit" value="Submit" />
        </form>
      </div>
    	<p><a href="/admin/bookmark/add">Add a bookmark</a>    
      {% for bookmark in bookmarks %}
      <div id="bookmark{{bookmark.id}}" class="post"> <span class="absolute box_2_t_l"></span> <span class="absolute box_2_t_r"></span> <span class="absolute box_2_b_l"></span> <span class="absolute box_2_b_r"></span>
        <h2><a href="/bookmark/{{bookmark.id}}">{{bookmark.name}}</a></h2>
        <p class="a">
        <span class="date">{{bookmark.createtime|timezone:8|date:"Y-m-d H:i:s"}}</span>
        <span class="category">Categorized Under: <a href="/category/{{bookmark.category.id}}">{{bookmark.category.name}}</a></span> 
        <span class="comments">{% if bookmark.comments %}{{bookmark.comments}}{% else %} 0 {% endif %} Commented</span> 
        <span class="tag">Tags: {% for tag in bookmark.tags %}<a href="/tag/s/{{tag}}">{{tag}}</a> {% endfor %}</span></p>
        <div class="details">
            <ul class="star-rating">
				<li id="starsrate" class="current-rating" style="width:{{bookmark.starrate}}%">Currently 5/5 Stars.</li>				
			</ul>
          <p><a href="{{bookmark.url}}"><img src="/bookmark/image/{{bookmark.id}}"></img></a>{{bookmark.description}}</p>
          <div class="snapshot"><a href="/admin/bookmark/edit/{{bookmark.id}}">edit</a> | <a href="/admin/bookmark/delete/{{bookmark.id}}">delete</a>
          {% if bookmark.zipcontent %}
          <a target="new" href="/bookmark/snapshot/{{bookmark.id}}"><img src="/static/images/snapshot.jpg"></img></a>
          {% endif %}
          </div> 
        </div>
      </div>
      {% endfor %}

      <div id="pages">
      	{% if show_prev %}
          <a href="{% if pageurl %}{{pageurl}}{% else %}/{% endif %}page/1">first</a>
          <a href="{% if pageurl %}{{pageurl}}{% else %}/{% endif %}page/{{ prev }}">prev</a>
        {% else %}first prev
        {% endif %}
        {% for page_cnt in page_list %}
          <a href="{% if pageurl %}{{pageurl}}{% else %}/{% endif %}page/{{ page_cnt }}">{{ page_cnt }}</a>
        {% endfor %} ...
        {% if show_next %}
          <a href="{% if pageurl %}{{pageurl}}{% else %}/{% endif %}page/{{ next }}">next</a>
          <a href="{% if pageurl %}{{pageurl}}{% else %}/{% endif %}page/{{max_page}}">last</a>
        {% else %}next last
        {% endif %}
      </div>

      <!-- /post-nav -->
    </div>
    <div class="sidebar">

      <div class="mob"> <span class="absolute box_2_t_l"></span> <span class="absolute box_2_t_r"></span> <span class="absolute box_2_b_l"></span> <span class="absolute box_2_b_r"></span>
        <h2>Categories</h2>
        <a href="/admin/category/add">Add a Category</a>

          {% for category in categorys %}
          <p><a href="/category/{{category.id}}">{{category.name}}</a> <a href="/admin/category/edit/{{category.id}}" >edit</a> | <a href="/admin/category/delete/{{category.id}}" >delete</a></p>

          {% endfor %}

      </div>      

    </div>
  </div>
</div>

{% include "footer.html" %}